package com.prs.crm.dao.ca.work.impl;

import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.criterion.Restrictions;

import com.prs.crm.dao.ca.work.PurchaseAppplyDetailDao;
import com.prs.crm.dao.impl.BaseDaoImpl;
import com.prs.crm.domain.ca.work.PurchaseApply;
import com.prs.crm.domain.ca.work.PurchaseAppplyDetail;

public class PurchaseAppplyDetailDaoImpl extends BaseDaoImpl<PurchaseAppplyDetail> implements PurchaseAppplyDetailDao{

	@SuppressWarnings("unchecked")
	@Override
	public List<PurchaseAppplyDetail> getPurchaseAppplyDetail(
			final PurchaseApply purchaseApply) {
		Criteria criteria=this.getSession().createCriteria(PurchaseAppplyDetail.class);
		criteria.add(Restrictions.eq("purchaseApply", purchaseApply));
		return criteria.list();
	}
}
